<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Login</title>

    <!-- 新 Bootstrap 核心 CSS 文件 -->
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <link href="../../common/js/rangeslider/css/main.css" rel="stylesheet">
    <link href="../../common/js/rangeslider/css/rangeslider.css" rel="stylesheet">
    <link href="../../common/js/weui-master/dist/style/weui.min.css" rel="stylesheet">
    <style>
        html, body, .page {
            height: 100%;
        }

        body {
            background: #F5F5F5;
        }

        .test-period-div {
            background: #ffffff;
        }

        .weui-navbar__item {
            background: #ffffff;
        }

        .panel_test_process > div {
            background: #ffffff;
        }

        .weui-tab__content {
            height: 100%;
        }

        .sg-test-title {
            text-align: center;
            background: #ffffff;
            min-height: 60px;
            margin-top: 5px;
            line-height: 60px;
        }

        .sg-test-body {
            text-align: center;
            background: #ffffff;
            min-height: 80px;
            margin-top: 5px;
            line-height: 80px;
        }

        .test-model-set {
            background: #ffffff;
            height: 60px;
            line-height: 60px;
            width: 100%;
            margin: 10px 0px;
            border-top: 1px solid #f4f4f4;
            border-bottom: 1px solid #f4f4f4;
        }

        .model-slider-div {
            padding-top: 10px;
        }

        .rangeslider {
            margin-bottom: 10px;
        }

        .placeholder-radio-div {
            line-height: 40px;
            font-size: 0.8rem;
        }

        .placeholder-min-max-div {
            line-height: 40px;
        }

        .placeholder-min-max-div > input {
            border: 0px;
            width: 40px;
            padding: 0px;
        }

        .placeholder-value-div > input {
            border: 0px;
            border-left: 2px solid #004BD2;
            width: 70px;
            padding-left: 10px;
        }
    </style>

</head>
<body>
<div class="page">
    <input type="hidden" id="tenantId" name="tenantId" value="1">
    <input type="hidden" id="testerId" name="testerId" value="1">
    <input type="hidden" id="productId" name="productId" value="1">
    <input type="hidden" id="deviceTypeId" name="deviceTypeId" value="1">
    <div class="page__bd" style="height: 100%;">
        <div class="weui-tab" style="height: 100%;">
            <div class="weui-navbar">
                <div href="#getDeviceList" to-url="getDeviceList" class="weui-navbar__item weui-bar__item_on">
                    <span>校验规则</span>
                </div>
                <div href="#testerMode" to-url="testerMode" class="weui-navbar__item">
                    <span>测试模式</span>
                </div>
            </div>
            <div class="weui-tab__panel">
                <div id="getDeviceList" class="weui-tab__content" style="display: block">
                    <div class="page">
                        <div class="page__bd page__bd_spacing">
                            <div class="weui-flex sg-test-title">
                                <div class="weui-flex__item">
                                    <div class="placeholder">属性名</div>
                                </div>
                                <div class="weui-flex__item">
                                    <div class="placeholder">校验规则</div>
                                </div>
                                <div class="weui-flex__item">
                                    <div class="placeholder">下发值</div>
                                </div>
                            </div>
                        </div>
                        <div class="page__bd page__bd_spacing">
                            <form action="" id="test-rule-page">

                            </form>
                        </div>
                        <div class="weui-btn-area" style="padding-top:0%">
                            <a class="weui-btn weui-btn_primary" href="javascript:void(0);" onclick="saveDeviceRule()"
                               style="background: #508FFB">应用</a>
                        </div>
                    </div>
                </div><!--校验规则-->


                <div id="testerMode" class="weui-tab__content">

                    <form action="/app/submitTesterMode" id="myForm">
                        <input type="hidden" name="testType" id="testType" value="">
                        <div class="test-model-set">
                            <div class="test-model-set-left" style="float:left; width: 50%;">
                                <span style="padding-left: 15px; ">正常测试模式</span>
                            </div>
                            <div class="test-model-set-left" style="float:left; width: 50%;">
                                <label for="mode-normal" class="weui-switch-cp" style="float: right;">
                                    <input id="mode-normal" class="weui-switch-cp__input mode-checkbox"
                                           type="checkbox"/>
                                    <div class="weui-switch-cp__box" style="margin: 15px;"></div>
                                </label>
                            </div>
                        </div>
                        <div class="weui-panel__hd" style="line-height: 0.1">正常测试模式仅测试一次数据是否上传成功</div>

                        <div class="test-model-set">
                            <div class="test-model-set-left" style="float:left; width: 50%;">
                                <span style="padding-left: 15px; ">压力测试模式</span>
                            </div>
                            <div class="test-model-set-left" style="float:left; width: 50%;">
                                <label for="mode-pressure" class="weui-switch-cp" style="float: right;">
                                    <input id="mode-pressure" class="weui-switch-cp__input mode-checkbox"
                                           type="checkbox"
                                           checked="checked"/>
                                    <div class="weui-switch-cp__box" style="margin: 15px;"></div>
                                </label>
                            </div>
                        </div>
                        <div class="weui-panel__hd" style="line-height: 0.1">压力测试模式在测试一定时间内不断进行上传下发</div>

                        <div id="test-mode-slider-div">
                            <div class="weui-media-box weui-media-box_text test-period-div">
                                <h4 class="weui-media-box__title">测试时长设置</h4>
                                <div>
                                    <label style="float: left;font-size: 14px">15分钟</label>
                                    <label style="float: right;font-size: 14px">48小时</label>
                                    <div style="clear: both"></div>
                                </div>
                                <!--<div id="test-period-slider" class="weui-slider-box__value"></div>-->
                                <div id="test-period-div" class="model-slider-div">
                                    <input type="range" id="test-period-slider" value="15" min="15" max="2880" step="15"
                                           data-rangeslider>
                                    <output>0.25小时</output>
                                    <input type="hidden" class="value" name="testPeriod" id="testPeriod">
                                </div>
                            </div>
                            <div class="weui-media-box weui-media-box_text test-period-div">
                                <h4 class="weui-media-box__title">测试间隔设置</h4>
                                <div>
                                    <label style="float: left;font-size: 14px" id="cmd-interval">1分钟</label>
                                    <label style="float: right;font-size: 14px">60分钟</label>
                                    <div style="clear: both"></div>
                                </div>
                                <!--<div class="weui-slider-box">
                                    <div id="cmd-interval-slider" class="weui-slider">
                                        <div class="weui-slider__inner">
                                            <div class="weui-slider__track"></div>
                                            <div class="weui-slider__handler"></div>
                                        </div>
                                    </div>
                                </div>-->
                                <div id="cmd-interval-div" class="model-slider-div">
                                    <input type="range" id="cmd-interval-slider" value="1" min="1" max="60" step="1"
                                           data-rangeslider>
                                    <output>1分钟</output>
                                    <input type="hidden" class="value" name="cmdInterval" id="cmdInterval">
                                </div>
                                <!--<div class="cmd-interval" style="width:100%"></div>-->
                            </div>
                            <div class="weui-media-box weui-media-box_text test-period-div">
                                <h4 class="weui-media-box__title">成功率设置</h4>
                                <div>
                                    <label style="float: left;font-size: 14px"><span id="success-radio">0</span></label>
                                    <label style="float: right;font-size: 14px">100%</label>
                                    <div style="clear: both"></div>
                                </div>
                                <div id="success-radio-div" class="model-slider-div">
                                    <input type="range" id="success-radio-slider" min="1" max="100" step="1" value="1"
                                           data-rangeslider>
                                    <output>1%</output>
                                    <input type="hidden" class="value" name="successRadio" id="successRadio">
                                </div>

                                <!--<div class="weui-slider-box">
                                    <div id="success-radio-slider" class="weui-slider">
                                        <div class="weui-slider__inner">
                                            <div class="weui-slider__track"></div>
                                            <div class="weui-slider__handler"></div>
                                        </div>
                                    </div>
                                    <div id="sliderValue2" class="weui-slider-box__value"></div>
                                </div>-->
                            </div>
                        </div>

                    </form>
                    <div class="weui-btn-area" style="padding-top:0%">
                        <a class="weui-btn weui-btn_primary" href="javascript:void(0);" onclick="submitTesterMode()"
                           style="background: #508FFB">应用</a>
                    </div>
                </div><!-- 测试模式 weui-tab__content-->
            </div>
        </div>
    </div>
</div>
</body>
<script src="../../common/js/jquery-1.11.1.min.js"></script>
<script src="../../common/js/weui-master/dist/js/weui.min.js"></script>
<script src="../../common/js/rangeslider/js/rangeslider.min.js"></script>
<script src="../../common.js"></script>
<script src="js/mode.js"></script>
</html>